﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Agro.Library {

    /// <summary>
    /// 缓存的键
    /// </summary>
    public static class CacheKeys {

        /// <summary>
        /// 菜单缓存的前缀
        /// </summary>
        public const string MenuCacheKeyPrefix = "_UserMenuCache_";

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public static string GetUserMenuCacheKey(int userId) {
            return MenuCacheKeyPrefix + userId.ToString();
        }

        public static void ClearCacheKeys()
        {
            MemoryCacheManager cacheManager = new MemoryCacheManager();
            cacheManager.Clear();
        }
    }
}
